<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小米商城产品列表练习</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        body {
            background-color: #ccc;
        }
        .items {
            position: relative;
            width: 1300px;
            height: 320px;
            margin: 100px auto;
        }
        .item {
            position: relative;
            float: left;
            width: 230px;
            height: 300px;
            margin-right: 20px;
            top: 0;
            background-color: #fff;
            overflow: hidden;
            transition: all .5s;
        }
        .desc {
            position: absolute;
            width: 100%;
            height: 88px;
            font-size: 12px;
            color: #fff;
            text-align: center;
            background-color: #ff6700;
            bottom: -100px;
            transition: all .5s;
            background-size: 50% 50%;
        }
        .item:hover {
            top: -5px;
            box-shadow: 0 0 15px #aaa;
        }
        .item:hover .desc {
            bottom: 0;
        }
        .new {
            position: absolute;
            width: 64px;
            height: 20px;
            line-height: 20px;
            font-size: 12px;
            color: #fff;
            text-align: center;
            background-color: #83c44e;
            left: 50%;
            margin-left: -32px;
        }
        .news {
            position: absolute;
            width: 70px;
            height: 20px;
            font-size: 12px;
            text-align: center;
            line-height: 20px;
            left: 50%;
            margin-left: -30px;
            color: #fff;
            background-color: #e53935;
        }
    </style>
</head>
<body>
    
    <div class="items">
        <div class="item">
            <img src="images/pms5.jpg" alt=""> 
        </div>
        <div class="item">
            <div class="new">新品</div>
            <img src="images/pms1.jpg" alt="">
            <div class="desc">是不是看上去很酷</div>
        </div>
        <div class="item">
            <div class="news">减200元</div>
            <img src="images/pms2.jpg" alt="">
            <div class="desc">大屏幕电视机，看起来更炫哦</div>
        </div>
        <div class="item">
            <div class="news">减300元</div>
            <img src="images/pms3.jpg" alt="">
            <div class="desc">超极本用起来更酷</div>
        </div>
        <div class="item">
            <div class="news">减200元</div>
            <img src="images/pms4.jpg" alt="">
            <div class="desc">手感很不错，赞赞赞</div>
        </div>
    </div>
</body>
</html>